package xyz.lwm.lazycat.aop;

import xyz.lwm.lazycat.annotation.Bean;
import xyz.lwm.lazycat.annotation.Configuration;
import xyz.lwm.lazycat.beans.BeanPostProcessor;

import java.util.List;

/**
 * aop config
 *
 * @author lwm
 */
@Configuration
public class AopConfiguration {

    @Bean
    public BeanPostProcessor aopBeanPostProcessor(List<Aspect> aspects) {
        return new AopBeanPostProcessor(aspects);
    }

    @Bean
    public Aspect aroundTypeAspect() {
        return new AroundTypeAspect();
    }

    @Bean
    public Aspect aroundMethodAspect() {
        return new AroundMethodAspect();
    }

}
